package com.zhuanzhuan.hero.user.service;

import com.bj58.zhuanzhuan.zzentry.common.service.entity.ServiceHeaderEntity;
import com.zhuanzhuan.hero.user.dto.*;
import com.zhuanzhuan.hero.user.entity.HeroUserContact;
import com.zhuanzhuan.hero.user.entity.HeroUserInfo;
import com.zhuanzhuan.hero.user.pojo.po.LabelInfoPO;
import com.zhuanzhuan.hero.user.vo.UserBaseInfoVO;
import com.zhuanzhuan.hero.user.vo.UserBriefInfoVO;
import com.zhuanzhuan.hero.user.vo.UserDetailVO;
import com.zhuanzhuan.hero.user.vo.UserItemBriefVO;

import java.util.List;

/**
 * @ClassName IUserService
 * @Description
 * @Author hanjunjun
 * @Date 2024/6/17 20:45
 */
public interface IUserService {

    /**
     * 用户注册
     *
     * @param uid
     * @param mobile
     * @return boolean
     * @author  hanjunjun
     * @date 2024/6/17
     **/
    boolean doRegister(Long uid, String mobile);

    /**
     * 注销
     *
     * @param uid
     * @return boolean
     * @author  hanjunjun
     * @date 2024/7/12
     **/
    boolean doUnRegist(Long uid);

    /**
     * 注销
     *
     * @param uid
     * @return boolean
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    boolean cancelAccount(Long uid);

    /**
     * 保存用户基本信息
     *
     * @param uid
     * @param saveUserBaseInfoDTO
     * @return void
     * @author  hanjunjun
     * @date 2024/6/20
     **/
    void saveUserBaseInfo(Long uid, SaveUserBaseInfoDTO saveUserBaseInfoDTO, ServiceHeaderEntity header);

    /**
     * 查询用户基础信息
     *
     * @param uid
     * @return com.zhaunzhuan.hero.user.vo.UserBaseInfoVO
     * @author  hanjunjun
     * @date 2024/6/20
     **/
    UserBaseInfoVO queryUserBaseInfo(long uid);

    /**
     * 基本信息风控失败的处理
     * @param uid
     * @param rejectedFields
     * @return java.lang.Boolean
     * @author  hanjunjun
     * @date 2024/6/22
     **/
    boolean userBaseInfoRiskcontrolFail(Long uid, List<String> rejectedFields);

    /**
     * 端外信息风控失败
     *
     * @param uid
     * @param rejectedFields
     * @return boolean
     * @author  hanjunjun
     * @date 2024/7/11
     **/
    boolean userOuterInfoRiskcontrolFail(Long uid, List<String> rejectedFields);

    /**
     * 修改个人简介
     *
     * @param uid
     * @param personalDescription
     * @return void
     * @author  hanjunjun
     * @date 2024/6/28
     **/
    void modifyPersonalIntroduction(Long uid, String personalDescription, ServiceHeaderEntity header);

    /**
     * 个人信息风控失败处理
     *
     * @param uid
     * @param rejectedFields
     * @return boolean
     * @author  hanjunjun
     * @date 2024/6/28
     **/
    boolean personIntroductionRiskcontrolFail(Long uid, List<String> rejectedFields);

    /**
     * 访客列表、隐私列表、同行认证列表靠谱认证列表通用
     *  装配头像、昵称、备注、关系等级、会员信息
     * @param selfUid 自己
     * @param otherUids 列表用户uid
     * @return java.util.List<com.zhuanzhuan.hero.user.vo.UserListItemVO.UserItem>
     * @author  hanjunjun
     * @date 2024/7/5
     **/
    List<UserItemBriefVO> buildUserItem(Long selfUid, List<Long> otherUids, boolean needAttentionInfo, boolean needMemberInfo);

    /**
     * 查询回收商设置的端外头像昵称
     *    未设置则返回端内的头像昵称
     * @param uid
     * @return com.zhuanzhuan.hero.user.vo.UserBriefInfoVO
     * @author  hanjunjun
     * @date 2024/7/6
     **/
    UserBriefInfoVO queryOuterInfo(Long uid);

    /**
     * 更新回收商端外展示的头像昵称
     *
     * @param uid
     * @param saveOuterInfoDTO
     * @return void
     * @author  hanjunjun
     * @date 2024/7/6
     **/
    void updateOuterInfo(Long uid, SaveOuterInfoDTO saveOuterInfoDTO, ServiceHeaderEntity header);

    /**
     * 查询用户详细信息  全量的
     *
     * @param loginUid  登录人
     * @param homemakerUid  被访问者
     * @param header
     * @return com.zhuanzhuan.hero.user.vo.UserDetailVO
     * @author  hanjunjun
     * @date 2024/7/6
     **/
    UserDetailVO queryUserDetailInfo(Long loginUid, Long homemakerUid, ServiceHeaderEntity header);

    /**
     * 端外查询用户详情
     *
     * @param uid
     * @return com.zhuanzhuan.hero.user.vo.UserDetailVO
     * @author  hanjunjun
     * @date 2024/7/18
     **/
    UserDetailVO queryUserDetailInfoOuter(Long uid);

    /**
     * 批量查询用户基本信息
     *
     * @param queryDTO
     * @return java.util.List<com.zhuanzhuan.hero.user.vo.UserBaseInfoVO>
     * @author  hanjunjun
     * @date 2024/7/9
     **/
    List<UserBaseInfoVO> batchQueryUserBaseInfo(BatchQueryUserInfoSelectiveDTO queryDTO);

    /**
     * 查询单个用户信息   可选字段
     *
     * @param queryUserInfoDTO
     * @return com.zhuanzhuan.hero.user.vo.UserBaseInfoVO
     * @author  hanjunjun
     * @date 2024/7/9
     **/
    UserBaseInfoVO queryUserBaseInfoSelective(QueryUserInfoDTO queryUserInfoDTO);

    /**
     * 批量查询用户详细信息
     *
     * @param fromUid
     * @param toUids
     * @param header 解析version隐藏会员等级
     * @return java.util.List<com.zhuanzhuan.hero.user.dto.UserDetailDTO>
     * @author  hanjunjun
     * @date 2024/7/9
     **/
    List<UserDetailDTO> batchGetUserDetail(Long fromUid, List<Long> toUids, ServiceHeaderEntity header);

    List<UserDetailVO> batchGetUserDetail4Homepage(Long fromUid, List<Long> toUids, ServiceHeaderEntity header);

    /**
     * 保存背景图
     *
     * @param uid
     * @param backdrop
     * @return void
     * @author  hanjunjun
     * @date 2024/7/9
     **/
    void saveUserBackdrop(Long uid, String backdrop, ServiceHeaderEntity header);

    /**
     * 背景图风控失败
     *
     * @param uid
     * @param rejectedFields
     * @return boolean
     * @author  hanjunjun
     * @date 2024/7/9
     **/
    boolean backdropControlFail(Long uid, List<String> rejectedFields);

    /**
     * 个人信息是否已完善
     *
     * @param uid
     * @param userInfo
     * @param userContact
     * @param managementLabelInfos
     * @return boolean
     * @author  hanjunjun
     * @date 2024/7/10
     **/
    boolean personInfoPerfection(Long uid, HeroUserInfo userInfo,
        HeroUserContact userContact, List<LabelInfoPO> managementLabelInfos);

    /**
     * 判断个人信息是否完善，完善则发送mq
     *
     * @param uid
     * @return void
     * @author  hanjunjun
     * @date 2024/7/10
     **/
    void personInfoPerfectionBroadcast(Long uid);

}
